feat: add a health-aware ingestion load balancer - #22
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughChangesIngestion load balancing
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Streamlit
participant NGINX
participant IngestionReplicas
participant Prometheus
Streamlit->>NGINX: Send ingestion request
NGINX->>IngestionReplicas: Route request across replicas
IngestionReplicas-->>NGINX: Return response with instance identity
NGINX-->>Streamlit: Return response
Prometheus->>NGINX: Scrape gateway metrics
Possibly related issues
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
CoreyLeath-code
marked this pull request as ready for review
August 12, 2026 15:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements issue #21 and retains the dated tracking entry in
Dailylog.md.8080) and keeps Go ingestion replicas internal./health) from Postgres-aware readiness (/ready).Files changed
nginx/ingestion-load-balancer.conf— least-connections upstream, health/readiness proxy policy, forwarded-request headers, internal NGINX status.docker-compose.yml— removes direct host exposure of ingestion replicas; adds the public gateway and exporter; points the dashboard at the gateway.ingestion-service/main.go— exposes liveness/readiness separately and optional test-only replica identity.ingestion-service/main_test.go— verifies the replica-identity header is opt-in.monitoring/prometheus.yml— scrapes gateway exporter metrics..github/workflows/ci-cd.yml— validates NGINX syntax and exercises three replicas, multi-replica routing, and one-replica failure resilience.README.md— documents the gateway, scaling command, and probe behavior.Dailylog.md— preserves the dated record and links enhancement: add a health-aware load-balancing layer for API workers #21.Validation performed
main: 8 files changed, branch is 8 commits ahead and 0 behind.8080.nginx -t, starts three replicas, probes/ready, checks multipleX-Instance-IDvalues, then stops one replica and rechecks readiness.The connected GitHub workspace cannot execute Docker or Go locally; the new CI job is the authoritative runtime validation and this PR remains draft until it reports.
Risks
Follow-up recommendations
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests